var pescados = {
	id: "pescados",

	visible: true,
	
	reiniciar: false,
	gameover: false,
	timer: 0,
	delay2: 0,	
	delay3: 0,
	muerte1: false,
	muerte2: false,
	muerte3: false,
	pausa: false,
	puntos: 0,

	init: function () {
	},

	update: function (delta) {
	
		this.timer++;
		/*/// GAMEOVER Y REINICIO DEL JUEGO
		if (this.gameover == true){
			this.reiniciar = true;
			if (this.reiniciar == true){
				this.delay1 = 0;
				this.delay2 = 0;
				this.delay3 = 0;
				jsGFwk._gameObjects.hud.vida3 = 1;
				jsGFwk._gameObjects.hud.vida2 = 1;
				jsGFwk._gameObjects.hud.vida1 = 1;
				this.puntos = 0;
				this.reiniciar = false;
				this.gameover = false;
			}
		}
		
		
		/// RESETO DE LOS DELTA
		this.delay1 += delta;
		if (this.delay1 > 10000){
			this.delay1 = 0;
		}
		this.delay2 += delta;
		if (this.delay2 > 10000){
			this.delay2 = 0;
		}
		this.delay3 += delta;
		if (this.delay3 > 10000){
			this.delay3 = 0;
		}
		
		/// DIFICULTAD
		if (this.puntos >= 0){
			this.delay1 += 0.025;
			this.delay2 += 0.025;
			this.delay3 += 0.025;			
		}
		
		if (this.puntos >= 20){
			this.delay1 += 0.035;
			this.delay2 += 0.035;
			this.delay3 += 0.035;			
		}
		if (this.puntos >= 50 ){
			this.delay1 += 0.05;
			this.delay2 += 0.05;
			this.delay3 += 0.05;			
		}
		
		//console.log (this.gameover + " " + this.reiniciar);
			*/			
	},

	draw: function (context) {
			
			//primer pez
			if (this.timer >= 2){
			context.drawImage(jsGFwk.ResourceManager.graphics.sprites.image,
					35, 72, 6, 11,
					53, 8, 6, 11); //pez1a			
			}
			if (this.timer >= 2){
			context.drawImage(jsGFwk.ResourceManager.graphics.sprites.image,
					34, 94, 9, 6,
					53, 27, 9, 6); //pez1b
			}
			if (this.timer >= 2){
			context.drawImage(jsGFwk.ResourceManager.graphics.sprites.image,
					33, 112, 7, 10,
					53, 42, 7, 10); //pez1c
			}
			if (this.timer >= 2){
			context.drawImage(jsGFwk.ResourceManager.graphics.sprites.image,
					34, 136, 9, 6,
					53, 63, 9, 6); //pez1d
			}
					
			
					
		}	
					
	};

	
